package cn.xjy.ddlc;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;

import java.net.URL;
import java.util.Objects;

public class GUI extends Application {
    
    @Override
    public void start(Stage stage) throws Exception {
        URL resource = GUI.class.getClassLoader().getResource("GUI.fxml");
        Objects.requireNonNull(resource);
        Parent root = FXMLLoader.load(resource);
        
        Scene scene = new Scene(root);
        
        Image icon = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/icon.png")));
        stage.getIcons().add(icon);
        stage.setScene(scene);
        stage.setResizable(false);
        stage.setTitle("表结构对比工具");
        stage.show();
    }
    
    public static void main(String[] args) {
        launch(GUI.class, args);
    }
    
}
